<html>
    <head>
        <link href="https://cdn.bootcss.com/limonte-sweetalert2/7.21.1/sweetalert2.css">
    </head>
    <body>
        <button id="ss">1111</button>
        <script src="https://cdn.bootcss.com/limonte-sweetalert2/7.21.1/sweetalert2.all.js"></script>
        <script>
            var btn = document.getElementById("ss");
            btn.onclick=function(){
                swal({ 
                    title: '确定删除吗？', 
                    text: '你将无法恢复它！', 
                    type: 'warning',
                    showCancelButton: true, 
                    confirmButtonColor: '#3085d6',
                    cancelButtonColor: '#d33',
                    confirmButtonText: '确定删除！', 
                    }).then(function(){
                    swal(
                        '删除！',
                        '你的文件已经被删除。',
                        'success'
                        );
                    })
            }

            
           
        </script>
    </body>
</html>